<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:40:"../template/wap/default/course/info.html";i:1583544068;s:62:"/www/wwwroot/schoolnx.nxers.com/template/wap/default/base.html";i:1583650542;}*/ ?>
<!DOCTYPE html><html lang="zh-cn"><head>    <meta charset="utf-8">    <?php if($title): ?>    <title><?php echo $title; ?></title>    <?php else: ?>    <title><?php echo config('website.site_title'); ?></title>    <?php endif; ?>    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />    <meta name="keywords" content="<?php echo config('website.site_keywords'); ?>">    <meta name="description" content="<?php echo config('website.site_description'); ?>">    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">    <link rel="stylesheet" type="text/css" href="/static/libs/layui/css/layui.css">    <link type="text/css" rel="stylesheet" href="/static/libs/hui/css/hui.css" />    <link type="text/css" rel="stylesheet" href="/static/libs/hui/css/mobile.css" />    </head><body>
<header class="hui-header">
    <div id="hui-back"></div>
    <h1 style="color:#3f3f3f"><?php echo $info['title']; ?></h1>
    <div id="hui-header-menu"  onclick="hui.showSlideMenu();"></div>
</header>
<div class="hui-wrap mb52">
    <div class="course-info">
        <img style="width:100%;height:200px;" src="<?php echo $info['picture']; ?>" />
        <div class="details ">
            <div class="hui-flex">
                <div class="userNum"><i class="layui-icon layui-icon-user mr10"></i>学员:<?php echo getUserNum($info['id'],1); ?></div>
                <div class="courseNum"><i class="layui-icon layui-icon-component mr10"></i>课时:<?php echo getCourseNum($info['id'],1); ?></div>
                <div class="browseNum"><i class="layui-icon layui-icon-read mr10"></i>浏览:<?php echo $info['views']; ?></div>
            </div>
            <div class="line"></div>
            <div>
                <div class="teacher fontsize-12">主讲：<?php echo getTeacherName($info['teacher_id']); ?></div>
                <div class="youxiao fontsize-12">课程有效期：<?php echo youxiaoqi($info['youxiaoqi']); ?></div>
                <?php if(!$isBuy): ?>
                <div class="price fontsize-12">价格：<i><?php echo isFree($info['price']); ?></i></div>
                <div class="price fontsize-12"><?php echo flashsale($info['id'],1,$info['price'],1); ?></div>
                <?php endif; ?>
            </div>
        </div>
        <div>
            <div class="hui-tab">
                <div class="hui-tab-title" id="course-tab">
                    <div>详情</div>
                    <div>课时</div>
                    <div>评论</div>
                    <div>讲师</div>
                </div>
                <div class="hui-tab-body course-section-box">
                    <div class="hui-tab-body-items">
                        <div class="hui-tab-item " >
                            <div class="mar10 course-brief"><?php echo $info['brief']; ?></div>
                        </div>
                        <div class="hui-tab-item">
                            <?php if(!empty($secList[0]['section'])): if(is_array($secList) || $secList instanceof \think\Collection || $secList instanceof \think\Paginator): if( count($secList)==0 ) : echo "$empty" ;else: foreach($secList as $key=>$vo): ?>
                            <div class="hui-accordion course-section">
                                <div class="hui-accordion-title"><?php echo $vo['title']; ?></div>
                                <div class="hui-accordion-content hui-list section-list">
                                    <ul  class="check-learn">
                                        <?php if(is_array($vo['section']) || $vo['section'] instanceof \think\Collection || $vo['section'] instanceof \think\Paginator): if( count($vo['section'])==0 ) : echo "" ;else: foreach($vo['section'] as $key=>$voo): ?>
                                        <li><a href="javascript:avoid(0)" target="_blank" sid="<?php echo $voo['id']; ?>" type="1" url="<?php echo url('index/Course/checkBuy'); ?>">
                                                <div class="hui-list-text fontsize-12"><?php echo isStudyBySid($voo['csid'],$voo['id'],$voo['coursetype']); ?><?php echo getSecIcon($voo['sectype']); ?><?php echo $voo['title']; if($voo['isfree']==1): ?>
                                                    <div class="hui-tags"><div>免</div></div>
                                                    <?php elseif($voo['previewtimes'] != 0): ?>
                                                    <div class="hui-tags"><div>试</div></div>
                                                    <?php else: endif; ?>
                                                </div>
                                            </a>
                                        </li>
                                        <?php endforeach; endif; else: echo "" ;endif; ?>
                                    </ul>
                                </div>
                            </div>
                            <?php endforeach; endif; else: echo "$empty" ;endif; else: ?>
                            <div class="hui-list section-list">
                                <ul class="check-learn">
                                    <?php if(is_array($secList) || $secList instanceof \think\Collection || $secList instanceof \think\Paginator): if( count($secList)==0 ) : echo "$empty" ;else: foreach($secList as $key=>$voo): ?>
                                    <li><a href="javascript:avoid(0)" target="_blank" sid="<?php echo $voo['id']; ?>" type="1" url="<?php echo url('index/Course/checkBuy'); ?>">
                                            <div class="hui-list-text fontsize-12"><?php echo isStudyBySid($voo['csid'],$voo['id'],$voo['coursetype']); ?><?php echo getSecIcon($voo['sectype']); ?><?php echo $voo['title']; if($voo['isfree']==1): ?>
                                                <div class="hui-tags"><div>免</div></div>
                                                <?php elseif($voo['previewtimes'] != 0): ?>
                                                <div class="hui-tags"><div>试</div></div>
                                                <?php else: endif; ?>
                                            </div>
                                        </a>
                                    </li>
                                    <?php endforeach; endif; else: echo "$empty" ;endif; ?>
                                </ul>
                            </div>
                            <?php endif; ?>
                        </div>
                        <div class="hui-tab-item">
                            <div class="hui-list list comment">
                                <ul>
                                    <?php if(is_array($comment) || $comment instanceof \think\Collection || $comment instanceof \think\Paginator): if( count($comment)==0 ) : echo "$empty" ;else: foreach($comment as $key=>$vo): ?>
                                    <li class="">
                                        <aside class="noter-pic">
                                            <img width="50" height="50" class="picImg" src="<?php echo defaultAvatar(getAvatar($vo['uid'])); ?>">
                                        </aside>
                                        <div class="of">
                                            <div class="clearfix">
                                                <div class="hui-fl name"><?php echo getUserName($vo['uid']); ?></div>
                                                <div class="hui-fr time"><?php echo $vo['addtime']; ?></div>
                                            </div>
                                            <div class="mt5 contents"><?php echo $vo['contents']; ?></div>
                                        </div>
                                    </li>
                                    <?php endforeach; endif; else: echo "$empty" ;endif; ?>
                                </ul>
                                <div class="page"><?php echo $comment->render(); ?></div>
                            </div>
                        </div>
                        <div class="hui-tab-item">
                            <div class="hui-list list comment">
                                <ul>
                                    <li class="" style="border-bottom:none;">
                                        <aside class="noter-pic">
                                            <img width="50" height="50" class="picImg" src="<?php echo defaultAvatar(getAvatar($info['teacher_id'])); ?>">
                                        </aside>
                                        <div class="of">
                                            <div class="clearfix">
                                                <div class="hui-fl name" style="line-height: 40px;"><?php echo getTeacherName($info['teacher_id']); ?></div>
                                            </div>
                                        </div>
                                    </li>
                                    <div class="mt5 contents"><?php echo getTeacherBrief($info['teacher_id']); ?></div>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div id="hui-footer" class="course-info-footer">
    <a href="/" id="nav-home">
        <div class="hui-footer-icons hui-icons-home" style="font-size: 18px;"></div>
        <div class="hui-footer-text">首页</div>
    </a>
    <a href="javascript:void(0)" id="nav-favate">
        <div class="hui-footer-icons hui-icons-star f <?php echo $isfavourite; ?>"></div>
        <div class="hui-footer-text f <?php echo $isfavourite; ?> "><span  url="<?php echo url('index/course/favourite'); ?>" class=" mr30 favourite" cid="<?php echo $info['id']; ?>" type="1" status="0">收藏</span></div>
        <div class="hui-footer-icons hui-icons-like unf <?php echo $nofavourite; ?>"></div>
        <div class="hui-footer-text unf <?php echo $nofavourite; ?>"><span  url="<?php echo url('index/course/unfavourite'); ?>" class="mr30 favourite" cid="<?php echo $info['id']; ?>" type="1" status="1">已收藏</span></div>
    </a>
    <?php if($info['status']==0): ?>
    <button type="button" class="hui-button hui-fl course-info-btn buy" style="width: 60% !important;" disabled="disabled">课程已下架</button>
    <?php elseif($isBuy): ?>
    <a href="javascript:void(0)"  class="hui-button  buy hui-primary course-info-btn hui-fl" style="width: 60% !important;">已经购买</a>
    <?php else: ?>
    <button type="button" class="hui-button hui-fl course-info-btn price" style="background: #FCFCFC;"><?php echo flashsale($info['id'],1,$info['price'],2); ?></button>
    <a href="<?php echo url('index/Course/creatorder',['id'=>hashids_encode($info['id']),'type'=>hashids_encode($info['type'])]); ?>" type="button" class="hui-button hui-danger hui-fl course-info-btn buy">购买课程</a>
    <?php endif; ?>
</div>
<div class="hui-slide-menu" style="width:210px;">    <div class="hui-list">        <ul>            <li>                <a href="/">                    <div class="hui-list-text">                        <div class="hui-list-text-content" style="color:#fff;">首页</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/course/videoindex'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content" style="color:#fff;">录播课程</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/course/liveindex'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">直播课程</div>                        <div class="hui-list-info "><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/classroom/index'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">班级课程</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/article/index'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">行业资讯</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>            <li>                <a href="<?php echo url('index/teacher/index'); ?>">                    <div class="hui-list-text">                        <div class="hui-list-text-content"  style="color:#fff;">名师风采</div>                        <div class="hui-list-info"><span class="hui-icons hui-icons-right"  style="color:#fff;"></span></div>                    </div>                </a>            </li>        </ul>    </div></div><script src="/static/libs/layui/layui.all.js"></script><script src="/static/libs/common/jquery.min.js"></script><script src="/static/libs/common/common.js"></script><script src="/static/libs/hui/js/hui.js"></script><script src="https://cdn.bootcss.com/stickyNavbar.js/1.3.5/jquery.stickyNavbar.min.js"></script>
<script src="/static/libs/hui/js/hui-tab.js"></script>
<script src="/static/libs/hui/js/hui-accordion.js"></script>
<script type="text/javascript">
    hui.tab('.hui-tab');
    hui.accordion(true, true);
</script>
<script>
    layui.use('util', function(){
        var util = layui.util;
        var endTime = new Date($('#endTime').val()).getTime()
            ,serverTime = new Date($('#nowTime').val()).getTime();
        util.countdown(endTime, serverTime, function(date, serverTime, timer){
            var str= '<span class="layui-badge countdown">'+date[0]+'天</span>';
            str=str+'<span class="layui-badge countdown" >'+date[1]+'时</span>';
            str=str+'<span class="layui-badge countdown" >'+date[2]+'分</span>';
            str=str+'<span class="layui-badge countdown" >'+date[3]+'秒</span>';
            lay('#remain').html(str);
        });
    });
</script>
</body></html>